import axios from '../utils/http'; // 导入http中创建的axios实例
import { Base64 } from '../utils/base';
let baseObj = new Base64()
const base_url = process.env.BASE_API
const inter_url = '/proxy/cam/proxy/common?api=';
const buyManageApi = {
  secondHandCarFacade(params) {
    let url = 'SecondHandCarFacade-secondHandCarMethod'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
  // 新增采购线索
  addPurchaseLeads(params) {
    let url = 'SecondHandCarFacade-addPurchaseLeads'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 新增采购线索跟进分录
  addPurchaseLeadsFollowEntry(params) {
    let url = 'SecondHandCarFacade-addPurchaseLeadsFollowEntry'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
    // 编辑保存采购线索
  editPurchaseLeads(params) {
    let url = 'SecondHandCarFacade-editPurchaseLeads'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
    // 根据Id获取采购线索详情
  getPurchaseLeadsById(params) {
    let url = 'SecondHandCarFacade-getPurchaseLeadsById'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
    // 获取采购线索列表
  getPurchaseLeadsList(params) {
    let url = 'SecondHandCarFacade-getPurchaseLeadsList'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
    // 删除采购线索
  removePurchaseLeads(params) {
    let url = 'SecondHandCarFacade-removePurchaseLeads'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
    // 转交采购线索
  followPurchaseLeads(params) {
    let url = 'SecondHandCarFacade-followPurchaseLeads'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
   // 获取线索任务转交人
  getPurchaseLeadsFollowPerson(params) {
    let url = 'SecondHandCarFacade-getPurchaseLeadsFollowPerson'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
     // 打开采购线索消息提醒触发事件
  leadsPurchaseTrigger(params) {
    let url = 'SecondHandCarFacade-leadsPurchaseTrigger'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
}

export default buyManageApi;
